package com.skycong.hello77.activity.webview;

import android.app.Activity;
import android.content.Intent;
import android.nfc.Tag;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.skycong.hello77.R;

/**
 * 加载webview的测试类
 * Created by Kiki on 2018/4/28.
 */

public class LoadUrlActivity extends Activity implements View.OnClickListener {
    private static final String TAG = "msg";
    private LoadUrlActivity activity = this;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_load_webview);
        findViewById(R.id.load_webview_url).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        String url = "http://www.baidu.com/";
        if(v.getId() == R.id.load_webview_url){
            Log.i(TAG,"activity传过的来url"+url);
            Intent intent = new Intent(activity,WebViewActivity.class);
            intent.putExtra("url","http://www.baidu.com");
            activity.startActivity(intent);
        }
    }
}
